package com.dayuanit.dy17.atm.atmbackoffice.mapper;

import com.dayuanit.dy17.atm.atmbackoffice.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    int insertUserRefRole(@Param("userId") Long userId,
                          @Param("roleId") Long roleId);

    List<Role> listRoles();

    List<Role> listRolesByUserId(Long userId);
}